﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MarioArena.Animation;
using MarioArena.World;
using Microsoft.Xna.Framework;

namespace MarioArena.Characters
{
    class Mario : Character
    {
        /// <summary>
        /// Constructs a new Mario character. 
        /// </summary>
        /// <param name="animationCollection">A collection of animations used for this character.</param>
        /// <param name="usedByPlayer">Indicates whether this character is being used by the player singleton or not.</param>
        public Mario(bool usedByPlayer)
            : base(GameManager.Instance.CreateMarioAnimations(), usedByPlayer) // The AnimationCollection used is already created by the GameManager
        {
            // Override the default character data
            Health = 100;

            Width = 24;
            Height = 48;
            MarginTop = 36;
            MarginBottom = 12;

            AccelerationX = 432f;
            DecelerationX = 936f;
            TurningDecelerationX = 1440f;
            AccelerationY = 936f; // Gravity
            AccelerationScale = 1.0f;

            this.ProjectileOrigin = new Vector2(this.Bounds.Right, this.Bounds.Top + (this.Bounds.Height / 2));
        }
    }
}
